import os

# res = os.system("export CUDA_VISIBLE_DEVICES=-1 && /home/devilmaycry/anaconda3/envs/tf-14.0/bin/python PolicyNetwork_version.py 1>out_file 2>&1 &")
# print(res)  # res=0成功运行，其他返回值为错误
os.system("mkdir mode0")
os.system("mkdir mode1")
os.system("mkdir mode2")
os.system("mkdir mode3")


#需要修改的输入参数
mode = 3
batch_size = 20


str_0 = "nohup /home/devilmaycry/anaconda3/envs/tf-14.0/bin/python -u ./PolicyNetwork_Version/PolicyNetwork_version.py"
str_1 = " --mode=%d "%mode
#str_1 = " --mode=0 "
#str_1 = " --mode=1 "
#str_1 = " --mode=2 "
#str_1 = " --mode=3 "
str_2 = " --batch_size=%d "%batch_size
#str_2 = " --batch_size=50 "
#str_2 = " --batch_size=100 "
#str_2 = " --batch_size=300 "
#str_2 = " --batch_size=500 "
os.system("mkdir mode%s/%s"%(mode, batch_size))
for i in range(100):
    str_3 = "1>mode%s/%s/%d_out 2>&1 "%(mode, batch_size, i)
    #str_3 = "1>%s/%d_out 2>&1 &"%("mode0", i)
    #str_3 = "1>%s/%d_out 2>&1 &"%("mode1", i)
    #str_3 = "1>%s/%d_out 2>&1 &"%("mode2", i)
    #str_3 = "1>%s/%d_out 2>&1 &"%("mode3", i)
    os.system(str_0+str_1+str_2+str_3)
    print(str_0+str_1+str_2+str_3)
